<script setup lang="ts">
// 超级优化主窗口
import {close} from "fs-extra";
const emit = defineEmits([
  "update:visible",
  "close",
]);
const props = defineProps({
  visible: {
    type: Boolean,
    default: false,
  },
  title: {
    type: String,
    default: '',
  },
  width: {
    type: [Number,String],
    default: 800,
  },
  style: {
    type: [Object,String],
    default: () => {
      return {
        top: '10px',
      }
    }
  },
});
const close = () => {
  emit("update:visible", false);
  emit("close");
};
</script>

<template>
  <custom-modal :title="title" :visible="visible" :width="width" :style="style" @close="close" @cancel="close">
    <template #headerLeft>
      <img src="../../../assets/icon-trans.png" :style="{
      width: '30px',
      marginRight: '10px',
      marginTop: '-4px',
    }">
    </template>
    <template #titleRight>
      <slot name="titleRight">

      </slot>
    </template>
    <slot>

    </slot>
  </custom-modal>
</template>

<style scoped>

</style>
